{% for lecture, topics in data %}
<div class="lecture">
  <h4><a href="/redirect/{{ lecture.source|urlencode}}/">Lecture {{lecture.number|title}}</a></h4>
  {% if topics %}
  <div class="category">
    {% for topic,alias in topics %}{% if alias %}<a href="/topics/{{ alias.name|title|urlencode }}/">{{ topic.name|title|safe }}</a>{% else %} {{ topic.name|title|safe }}{% endif %}{%if not forloop.last %}, {% endif %}{% endfor %}.
  </div>
  {% endif %}
</div>
{% endfor %}
